39ea4b6870944bdd036e28f6ecdb294af926ab6a,src/me/corriekay/pokegoutil/utils/ConfigNew.java,ConfigNew,getString,#ConfigKey#,108
Before Change
}
public String getString(ConfigKey configKey) {
try {
FindResult res = findNode(configKey.keyName, false);
String value = res.node().getString(res.name());
return StringEscapeUtils.unescapeJson(value);
} catch (JSONException jsone) {
String defaultValue = configKey.getDefaultValue();
System.err.println("Could not fetch config item '" + configKey.keyName + "'! Fallback to default: " + defaultValue);
setString(configKey, StringEscapeUtils.escapeJson(defaultValue));
return defaultValue;
}
}
After Change
* @return The String under the key, or default value.
*/
public String getString(final ConfigKey configKey) {
return getString(configKey, configKey.getDefaultValue());
}
/**